package NetworkDB;

use strict;
use warnings;

use base 'Class::DBI::Pg';

use Conf;
use Data::Dumper;

my $conf = Conf->show;

my ($dsn, $username, $password) = getConfig();

sub initialize {
	my $self = shift;
}

NetworkDB->set_db('Main',
                             $dsn,
                             $username,
                             $password,
                             {AutoCommit=>1},
                            );

sub getConfig {
       return ('dbi:Pg:dbname='.$conf->{DB_NAME}, $conf->{DB_LOGIN}, $conf->{DB_PASSWORD});
}

1;
